const PackageIcon = ({ pm, className }: { pm: string; className?: string }) => {
  switch (pm) {
    case "npm":
      return (
        <svg className={className} viewBox="0 0 24 24" fill="currentColor">
          <title>npm</title>
          <path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z" />
        </svg>
      );
    case "pnpm":
      return (
        <svg
          className={className}
          width="800px"
          height="800px"
          viewBox="0 0 32 32"
          xmlns="http://www.w3.org/2000/svg"
        >
          <title>pnpm</title>
          <path d="M30,10.75H21.251V2H30Z" style={{ fill: "#f9ad00" }} />
          <path d="M20.374,10.75h-8.75V2h8.75Z" style={{ fill: "#f9ad00" }} />
          <path d="M10.749,10.75H2V2h8.749Z" style={{ fill: "#f9ad00" }} />
          <path d="M30,20.375H21.251v-8.75H30Z" style={{ fill: "#f9ad00" }} />
          <path d="M20.374,20.375h-8.75v-8.75h8.75Z" style={{ fill: "#fff" }} />
          <path d="M20.374,30h-8.75V21.25h8.75Z" style={{ fill: "#fff" }} />
          <path d="M30,30H21.251V21.25H30Z" style={{ fill: "#fff" }} />
          <path d="M10.749,30H2V21.25h8.749Z" style={{ fill: "#fff" }} />
        </svg>
      );
    case "bun":
      return (
        <svg
          className={className}
          xmlns="http://www.w3.org/2000/svg"
          fill="none"
          viewBox="0 0 100 100"
        >
          <title>bun</title>
          <path
            fill="#000"
            d="M89.237 32.3c-.2-.213-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625A33.08 33.08 0 0 1 94.75 51c0 20.712-21.025 37.562-46.875 37.562-14.475 0-27.425-5.287-36.038-13.575l.625.625.625.625.625.625.625.625.625.625.625.625.625.625c8.6 8.638 21.838 14.2 36.663 14.2 25.85 0 46.875-16.85 46.875-37.5 0-8.825-3.8-17.187-10.513-23.762"
          />
          <path
            fill="#FBF0DF"
            d="M91.625 51c0 19.012-19.588 34.425-43.75 34.425S4.125 70.012 4.125 51c0-11.788 7.5-22.2 19.025-28.375s18.7-12.5 24.725-12.5 11.175 5.162 24.725 12.5C84.125 28.8 91.625 39.212 91.625 51"
          />
          <path
            fill="#F6DECE"
            d="M91.625 51a27 27 0 0 0-1-7.225C87.213 85.4 36.438 87.4 16.475 74.95a50 50 0 0 0 31.4 10.475C72 85.425 91.625 69.987 91.625 51"
          />
          <path
            fill="#FFFEFC"
            d="M31.038 20.337c5.587-3.35 13.012-9.637 20.312-9.65a11.6 11.6 0 0 0-3.475-.562c-3.025 0-6.25 1.562-10.312 3.912-1.413.825-2.876 1.738-4.425 2.688-2.913 1.8-6.25 3.837-10 5.875C11.237 29.037 4.124 39.65 4.124 51v1.487c7.575-26.762 21.338-28.8 26.913-32.15"
          />
          <path
            fill="#CCBEA7"
            fillRule="evenodd"
            d="M44.275 13.287a20.51 20.51 0 0 1-7.037 15.588c-.35.312-.075.912.375.737 4.212-1.637 9.9-6.537 7.5-16.425-.1-.562-.838-.412-.838.1m2.838 0a20.3 20.3 0 0 1 2.012 16.838c-.15.437.388.812.688.45 2.737-3.5 5.125-10.45-2.025-17.95-.363-.325-.925.175-.675.612zm3.45-.212a20.52 20.52 0 0 1 8.562 14.7.412.412 0 0 0 .813.137c1.15-4.362.5-11.8-8.963-15.662-.5-.2-.825.475-.412.775zm-23.075 13a21.18 21.18 0 0 0 13.087-11.25c.225-.45.938-.275.825.225-2.162 10-9.4 12.087-13.9 11.812-.475.013-.462-.65-.012-.787"
            clipRule="evenodd"
          />
          <path
            fill="#000"
            d="M47.875 88.562C22.025 88.562 1 71.712 1 51c0-12.5 7.725-24.163 20.663-31.15 3.75-2 6.962-4.013 9.825-5.775a262 262 0 0 1 4.5-2.738C40.375 8.737 44.125 7 47.875 7S54.9 8.5 59 10.925c1.25.712 2.5 1.487 3.837 2.337 3.113 1.925 6.626 4.1 11.25 6.588C87.026 26.837 94.75 38.487 94.75 51c0 20.712-21.025 37.562-46.875 37.562m0-78.437c-3.025 0-6.25 1.562-10.312 3.912-1.413.825-2.876 1.738-4.425 2.688-2.913 1.8-6.25 3.837-10 5.875C11.237 29.037 4.124 39.65 4.124 51c0 18.987 19.625 34.437 43.75 34.437S91.625 69.987 91.625 51c0-11.35-7.112-21.963-19.025-28.375-4.725-2.5-8.412-4.85-11.4-6.7-1.363-.838-2.613-1.613-3.75-2.3-3.788-2.25-6.55-3.5-9.575-3.5"
          />
          <path
            fill="#B71422"
            d="M56.688 60.125a11.16 11.16 0 0 1-3.65 5.887 8.5 8.5 0 0 1-5 2.35 8.55 8.55 0 0 1-5.163-2.35 11.16 11.16 0 0 1-3.6-5.887.9.9 0 0 1 1-1.013H55.7a.9.9 0 0 1 .987 1.013"
          />
          <path
            fill="#FF6164"
            d="M42.875 66.112a8.64 8.64 0 0 0 5.15 2.375 8.64 8.64 0 0 0 5.137-2.375q.672-.625 1.25-1.337a8.54 8.54 0 0 0-6.125-2.888 7.69 7.69 0 0 0-6.25 3.475c.288.263.538.513.838.75"
          />
          <path
            fill="#000"
            d="M43.075 65.125a6.7 6.7 0 0 1 5.237-2.6 7.5 7.5 0 0 1 5 2.112c.288-.312.563-.637.825-.962a8.75 8.75 0 0 0-5.887-2.413 7.95 7.95 0 0 0-6.112 2.95q.443.482.937.913"
          />
          <path
            fill="#000"
            d="M47.987 69.112a9.28 9.28 0 0 1-5.562-2.5 11.9 11.9 0 0 1-3.888-6.312 1.5 1.5 0 0 1 .325-1.25 1.76 1.76 0 0 1 1.413-.638H55.7a1.8 1.8 0 0 1 1.412.638 1.49 1.49 0 0 1 .313 1.25 11.9 11.9 0 0 1-3.888 6.312 9.27 9.27 0 0 1-5.55 2.5m-7.712-9.25c-.2 0-.25.088-.263.113a10.36 10.36 0 0 0 3.413 5.462 7.8 7.8 0 0 0 4.562 2.188 7.85 7.85 0 0 0 4.563-2.163A10.38 10.38 0 0 0 55.95 60a.26.26 0 0 0-.25-.113z"
          />
          <path
            fill="#FEBBD0"
            d="M66.9 60.9c4.038 0 7.312-1.926 7.312-4.3 0-2.375-3.273-4.3-7.312-4.3s-7.313 1.925-7.313 4.3 3.274 4.3 7.313 4.3m-37.837 0c4.038 0 7.312-1.926 7.312-4.3 0-2.375-3.274-4.3-7.312-4.3-4.04 0-7.313 1.925-7.313 4.3s3.274 4.3 7.313 4.3"
          />
          <path
            fill="#000"
            fillRule="evenodd"
            d="M32.5 54.875a6.888 6.888 0 1 0 .025-13.775 6.888 6.888 0 0 0-.025 13.775m30.963 0a6.887 6.887 0 1 0-6.838-6.888 6.875 6.875 0 0 0 6.837 6.888"
            clipRule="evenodd"
          />
          <path
            fill="#fff"
            fillRule="evenodd"
            d="M30.375 48.425a2.588 2.588 0 1 0 .025-5.176 2.588 2.588 0 0 0-.025 5.176m30.963 0a2.588 2.588 0 1 0-.026 0z"
            clipRule="evenodd"
          />
        </svg>
      );

    case "github":
      return (
        <svg className={className} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 97.63 96.03">
          <title>Github</title>
          <path
            fill="#f0f6fc"
            fillRule="evenodd"
            d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a47 47 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0"
            clipRule="evenodd"
          />
        </svg>
      );
    default:
      return null;
  }
};

export default PackageIcon;
